/*
 * Nod.h
 *
 *  Created on: May 17, 2012
 *      Author: david
 */

#ifndef NOD_H_
#define NOD_H_

#include<iostream>
#include<string>

class Nod {
	/*nodul din arborele expresiei functiei*/
protected:
	Nod *fStang,*fDrept;/*fiul stand si fiul drept*/
	long double x;/*valoarea punctului in care se face calculul expresiei*/
public:
	Nod();
	virtual ~Nod();

	/*metode pur virtuale*/
	virtual long double calcul() = 0;
	virtual std::string derivare() = 0;
	virtual long double calculDerivata() = 0;
	virtual std::string toString() = 0;

	Nod* getFStang();
	void setFStang(Nod*);
	Nod* getFDrept();
	void setFDrept(Nod*);

	void setX(long double y){
		x = y;
	}
	long double getX(){
		return x;
	}
};

#endif /* NOD_H_ */
//metodele statice trebuie definite in header
